package com.sxt.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import redis.clients.jedis.Jedis;

/**
 * 自动实例化redis
 * @author Liushuangxi
 *
 */
@Configuration
public class RedisAutoConfiguration {
	@Autowired
	private RedisProperty property;
	
	@Bean
	public Jedis jedis() {
		Jedis jedis = new Jedis(property.getHost(),property.getPort());
		System.out.println(jedis);
		return jedis;
	}
}
